function [tr_data, tr_labels, te_data, te_labels] = ...
         gen_splitted_data_brute_force(X1train, X2train, ytrain, gidtrain, test_group_id)
%gen_splitted_data Preprocesses the data and creates training and test 
%                  data. The split is done according to test_group_id - 
%                  this is the group that will be used for testing.
    diff = gen_data_brute_force(X1train, X2train);
    
    % split to test and training
    tr_data = diff(gidtrain~=test_group_id,:);
    te_data = diff(gidtrain==test_group_id,:);
    tr_labels = ytrain(gidtrain~=test_group_id);
    te_labels = ytrain(gidtrain==test_group_id);
end


